function banner() {
    var mySwiper = new Swiper('.swiper', {
        // direction: 'vertical', // 垂直切换选项
        loop: true, // 循环模式选项
        effect: 'coverflow',
        slidesPerView: 1.7,
        centeredSlides: true,
        parallax: true,
        coverflowEffect: {
            rotate: 0,
            stretch: 10,
            depth: 100,
            modifier: 3,
            slideShadows: false
        },
        autoplay: {   // 自动轮播
            delay: 1500,
            stopOnLastSlide: false,
            disableOnInteraction: false,
            pauseOnMouseEnter: true,   // 鼠标移入停止
        },

        // 如果需要分页器
        pagination: {
            el: '.swiper-pagination',
            clickable: true,
            clickableClass: 'my-pagination-clickable',
            bulletElement: 'li',
            dynamicBullets: false,   // 放大缩小
            dynamicMainBullets: 2,   // 放大缩小数量

        },
        uniqueNavElements: true,
        // 如果需要前进后退按钮
        navigation: {
            nextEl: '.swiper-button-next',
            prevEl: '.swiper-button-prev',
        },


        // 如果需要滚动条
        scrollbar: {
            el: '.swiper-scrollbar',
        },
    })
}


// 渲染轮播图
function xrbanner(data) {
    data.forEach((v, k) => {
        var div = `<div class="swiper-slide">
                    <a href='${v.jumpurl}'>
                    <img class="swiper_banner" src="${v.picurl}" alt="">
                    </a>
                    </div>`
        $('.swiper-wrapper').append(div)
    });

}


// 轮播图鼠标事件
$('.article-top').mouseover(function () {
    $('.swiper-button-prev').addClass('ac')
    $('.swiper-button-next').addClass('ac')
})

$('.article-top').mouseout(function () {
    $('.swiper-button-prev').removeClass('ac')
    $('.swiper-button-next').removeClass('ac')
})




